﻿using Orchard.Localization;
using Orchard.Projections.Services;
using Vitus.Featured.Models;

namespace Vitus.Featured.Providers.MemberBinding
{
    public class FeaturedPartMemberBinding : IMemberBindingProvider
    {
        public FeaturedPartMemberBinding()
        {
            T = NullLocalizer.Instance;
        }

        public Localizer T { get; set; }

        public void GetMemberBindings(BindingBuilder builder)
        {
            builder
                .Add(typeof(FeaturedPartRecord).GetProperty("IsFeatured"), T("Is Featured"), T("Determines whether the content is featured"))
                .Add(typeof(FeaturedPartRecord).GetProperty("Title"), T("Featured Title"), T("The featured title of the content"))
                .Add(typeof(FeaturedPartRecord).GetProperty("Body"), T("Featured Body"), T("The featured description of the content"))
                .Add(typeof(FeaturedPartRecord).GetProperty("IsPinned"), T("Is Pinned"), T("Determines whether the featured content is pinned"))
                ;
        }
    }
}